home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / terms / kermit / b / ckcker.bwr < prev    next >
Encoding:
Text File  |  1993-06-30  |  39.3 KB  |  841 lines

  1. CKCKER.BWR          "Beware File" for C-Kermit Version 5A        -*- text -*-
  2.  
  3. Applies to 5A(189)
  4. Last update: Wed Jun 30 10:08:36 1993
  5.  
  6. Authors: Frank da Cruz, Christine M. Gianone, Columbia University.
  7.  
  8.   Copyright (C) 1985, 1993, Trustees of Columbia University in the City of New
  9.   York.  The C-Kermit software may not be, in whole or in part, licensed or
  10.   sold for profit as a software product itself, nor may it be included in or
  11.   distributed with commercial products or otherwise distributed by commercial
  12.   concerns to their clients or customers without written permission of the
  13.   Office of Kermit Development and Distribution, Columbia University.  This
  14.   copyright notice must not be removed, altered, or obscured.
  15.  
  16. Report problems, suggestions, fixes, etc, to Frank da Cruz:
  17.  
  18.   Columbia University Academic Information Systems
  19.   612 West 115th Street, New York, NY  10025  USA
  20.  
  21.   Internet: fdc@columbia.edu
  22.   BITNET/EARN: FDCCU@CUVMA
  23.  
  24. C-Kermit 5A is documented in the book "Using C-Kermit" by Frank da Cruz and
  25. Christine M. Gianone, Digital Press, Burlington, MA, USA.  Digital Press ISBN:
  26. 1-55558-108-0; Prentice-Hall ISBN: 0-13-037490-3.  Price: US $34.95.  In USA,
  27. call DECdirect at 1-800-344-4825, refer to order number EY-J896E-DP.
  28.  
  29. NOTE: Several changes have been made to C-Kermit since the 5A(188) release.
  30. These are listed in CKCKER.UPD.
  31.  
  32. THE C-KERMIT COMMAND PARSER
  33.  
  34.  . There is no command recall or retry.
  35.  . VAX/VMS-style command parsing (arrow keys, etc) is not supported.
  36.  . EMACS- or VI-style command line editing is not supported.
  37.  . Typeahead is presently not allowed.
  38.  . Editing keys are hardwired (Ctrl-U, Ctrl-W, etc).
  39.  
  40. If you specify an alternate initialization file on the command line (using the
  41. -y option) and the specified file does not exist or cannot be opened, no error
  42. message is printed.
  43.  
  44. If you enter control characters, space, or question mark into a command
  45. preceded by the command-quote character, backslash (\), the backslash
  46. disappears and is replaced by the quoted character.  If the quoted character
  47. is a control character, it is displayed as a circumflex (^).  This allows
  48. editing (backspace, delete, Ctrl-W, Ctrl-W) to work correctly.
  49.  
  50. If you quote special characters in a filename (e.g. in the SEND command),
  51. filename completion may appear to work incorrectly.  For example, if you have
  52. a file whose name is a*b (the name really contains an asterisk), and you type
  53. "send a\\*<ESC>", the "b" will not appear, nor will Ctrl-R redisplay the
  54. completed name correctly.  But internally the file name is recognized anyway.
  55.  
  56. Question-mark help does not work during execution of an ASKQ command.  The
  57. question marks are simply accepted as text.
  58.  
  59. The maximum length for a variable name is 20 characters.  For array
  60. declarations and references, that includes the subscript.  So, for example:
  61.  
  62.   \%a[\m(max_services)]
  63.  
  64. is one character too long (note: this can easily be changed by redefining
  65. the symbol VNAML in ckuusr.h and recompiling C-Kermit).
  66.  
  67. Some other maximums to watch out for:      Symbol    Value Defined in
  68.                                      
  69.  Nesting level for command files:           MAXTAKE      30  ckuusr.h
  70.  Nesting level for macros:                  MACLEVEL     50  ckuusr.h
  71.  Nesting level for FOR / WHILE loops:       FORDEPTH     10  ckuusr.h
  72.  Number of macros:                          MAC_MAX     256  ckuusr.h
  73.  Size of INPUT buffer:                      INPBUFSIZ   256  ckuusr.h
  74.  Filespecs in MSEND command:                MSENDMAX    100  ckuusr.h
  75.  Length of MSEND or GET string:             FSPECL      300  ckuusr.h
  76.  Length for GOTO target label:              LBLSIZ       50  ckuusr.h
  77.  Number of characters in a command:         CMDBL      1024  ckucmd.h
  78.  Number of chars in a field of a command:   ATMBL       256  ckucmd.h
  79.  \fexecute() recursion depth limit          CMDDEP       20  ckucmd.h
  80.  
  81. ASK and ASKQ treat semicolon preceded by whitespace as a comment introducer.
  82. If the user's response includes a semicolon preceded by whitespace, these and
  83. all subsequent characters are discarded.  To include a semicolon preceded by
  84. whitespace, the user can quote the semicolon, for example:
  85.  
  86.   C-Kermit>ask \%a { What? }
  87.    What? this text ; includes a comment character
  88.   C-Kermit>echo \%a
  89.   this text
  90.   C-Kermit>ask \%a { What? }
  91.    What? this text \; includes a comment character
  92.   C-Kermit>echo \%a
  93.   this text ; includes a comment character
  94.   C-Kermit>
  95.  
  96. ASK and ASKQ strip leading and trailing spaces from what the user types.  This
  97. happens way down deep in the command parser -- it's nothing special about ASK
  98. and friends.  The only way around this that works in both C-Kermit and MS-DOS
  99. Kermit is for the user (the one who is responding to the ASK prompt) to type
  100. (the first) leading space as "\32" and the (final) trailing space as "\32".
  101. In this example, the password begins with 2 leading blanks and ends with two
  102. trailing blanks, and "Passwd:" is the ASK prompt:
  103.  
  104.   Passwd:\32 secret \32
  105.  
  106. Of course, the user could also type *all* blanks as \32.
  107.  
  108. C-Kermit gives a few other tricks to make it easier on the end-user (if not on
  109. the script programmer).  For example, you could write a macro like this to let
  110. users enter their text enclosed in doublequotes if they want to preserve
  111. leading and/or trailing spaces (in which case the macro trims the quotes):
  112.  
  113. ; Define a macro XASK to prompt the user for some text and to
  114. ; keep the leading and trailing spaces if the user encloses the text
  115. ; in doublequotes...  Argument \%1 is the ASK prompt.  Variable \%9
  116. ; is a local variable used to hold and return the response.
  117. ;
  118. define xask ask \%9 \%1, -
  119.   if eq \fright(\%9,1) " if eq \fsubstr(\%9,1) " -
  120.     assign \%9 \fsubstr(\%9,2,\feval(\flen(\%9)-2)), -
  121.   return \%9
  122.  
  123. ; This shows how to use the macro.
  124. ; Type Ctrl-C to get back to the prompt.
  125.  
  126. :loop
  127. assign \%a \fexecute(xask {{This is the prompt: }})
  128. echo [\%a]
  129. goto loop
  130.  
  131. This gives results like:
  132.  
  133. This is the prompt: abc xyz
  134. [abc xyz]
  135. This is the prompt:      abc xyz
  136. [abc xyz]
  137. This is the prompt: "abc xyz"
  138. [abc xyz]
  139. This is the prompt: "     abc xyz "
  140. [     abc xyz ]
  141.  
  142. In OUTPUT commands only, \B and \\B send a BREAK signal, and \L and \\L send a
  143. Long BREAK signal.  If you really want to output a backslash followed by a B
  144. or an L, use "output \\\\B" or "output \\\\L" (yes, four backslashes).
  145.  
  146. On certain SCO UNIX systems, the RETURN command does not function correctly.
  147. Example:
  148.  
  149.   C-Kermit>define first return 1
  150.   C-Kermit>first
  151.   C-Kermit>echo \v(return)
  152.   return                    <--- This should say "1" rather than "return"
  153.   C-Kermit>
  154.  
  155. Cause and cure are unknown.
  156.  
  157.  
  158. MULTIPLE SESSIONS
  159.  
  160. C-Kermit does not support multiple sessions.  When you SET LINE (or SET PORT,
  161. same thing) to a new device, or SET HOST to a new host, the previous SET LINE
  162. device (or network host connection) is closed, resulting in hangup of the
  163. modem or termination of the network connection.  In windowing environments
  164. like NeXTSTEP, OS/2, etc, you can run separate copies of Kermit in different
  165. windows to achieve multiple sessions.
  166.  
  167.  
  168. NETWORK COMMUNICATION
  169.  
  170. On a TCP/IP TELNET connection, you should normally have PARITY set to NONE
  171. and FLOW-CONTROL also set to NONE.  If file transfer does not work with these
  172. settings (for example, because the remote TELNET server only gives a 7-bit
  173. data path), use SET PARITY SPACE.  Do not use SET PARITY MARK, EVEN, or ODD
  174. on a TELNET connection.
  175.  
  176. If echoing does not work right after connecting to a network host or after
  177. dialing through a TCP/IP modem server, it probably means that the TELNET
  178. server on the far end of the connection is executing the TELNET protocol
  179. incorrectly.  After initially connecting and discovering incorrect echoing
  180. (characters are echoed twice, or not at all), escape back, give the
  181. appropriate SET DUPLEX command (FULL or HALF), and then CONNECT again.
  182. For a consistently misbehaving connection, you can automate this process in
  183. a macro or TAKE file.
  184.  
  185.  
  186. MODEM DIALING
  187.  
  188. Here are a few points to clarify the purpose of SET DIAL SPEED-MATCHING:
  189.  
  190.  1. This command does not do anything at all to the modem.  Rather, it
  191.     tells C-Kermit whether or not to change its interface speed in response
  192.     to the speed given in the modem's CONNECT message.  By default,
  193.     SPEED-MATCHING is ON, so Kermit does indeed attempt to change its speed.
  194.  
  195.  2. This implies that when DIAL SPEED-MATCHING is ON:
  196.  
  197.     (a) Your modem must be configured to report its *interface* speed in the
  198.         CONNECT message, rather than the connection (modulation) speed.
  199.  
  200.     (b) Your computer (and C-Kermit) must support all connection speeds that
  201.         might be reported by your modem.  SET SPEED ? will give you a list of
  202.         the speeds that your version of C-Kermit knows about.
  203.  
  204.  3. If conditions (a) and (b) cannot be satisfied, then you must:
  205.  
  206.     (a) Configure your modem to lock its interface speed
  207.  
  208.     (b) SET DIAL SPEED-MATCHING OFF
  209.  
  210. C-Kermit knows about a large number of modems, depending on how it was
  211. built (type "set modem ?" to see the supported modem types; type "show
  212. features" to see any specific modem-related configuration options).
  213. This knowledge is imbedded in the SET MODEM and DIAL commands.  If you are
  214. having trouble dialing your modem:
  215.  
  216.  a. SET DIAL DISPLAY ON to watch the dialing interactions between C-Kermit
  217.     and your modem.
  218.  
  219.  b. Make sure you have given the SET MODEM <name> command BEFORE you
  220.     issued the SET LINE and DIAL commands, and make sure that the modem
  221.     name that you specified corresponds to the actual modem that you are
  222.     trying to use.
  223.  
  224.  c. Make sure you have given a SET SPEED command to connect to the modem
  225.     at a speed it supports (like 2400), AFTER you gave the SET LINE command.
  226.  
  227.  d. If that doesn't work, give the command SET DIAL MODEM-HANGUP OFF and
  228.     try again.
  229.  
  230.  e. If that doesn't help, Give the command SET DIAL HANGUP OFF and try again.
  231.  
  232.  f. If that doesn't work, give the command SET CARRIER OFF and try again.
  233.  
  234.  g. If that doesn't work, maybe your modem is configured incorrectly.  Use
  235.     SET DIAL INIT-STRING <text> to have C-Kermit send the proper
  236.     configuration commands to the modem at the commencement of dialing.
  237.  
  238.  h. Check the hardware configuration of your modem, and check the cable that
  239.     connects your modem to your computer.
  240.  
  241. If it takes your call longer to be completed than the timeout interval that
  242. C-Kermit calculates, you can use the SET DIAL TIMEOUT command to override
  243. C-Kermit's value.  But beware: the modem has its own timeout for completing
  244. the call.  If it is a Hayes-like modem, C-Kermit adjusts the modem's value
  245. too by setting register S7.  But the maximum value for S7 might be smaller
  246. than the time you need!  In that case, C-Kermit sets S7 to 0, 255, or other
  247. (modem-specific) value to signify "no timeout".
  248.  
  249. WARNING: Certain modems might have a maximum dial timeout shorter than what
  250. Kermit expects it to be.  If Kermit attempts to set register S7 to a value
  251. higher than your modem's maximum, the modem will say "ERROR" and you will get
  252. a "Failure to initialize modem" error.  In that case, use SET DIAL TIMEOUT to
  253. override C-Kermit's calculation of the timeout value with the highest value
  254. that is legal for your modem, e.g. 60.
  255.  
  256. How to DIAL from a TCP/IP reverse terminal server (modem server):
  257.  
  258.  1. (only if neccessary) SET TELNET ECHO REMOTE
  259.  2. SET HOST <terminal-server-ip-name-or-address> [ <port> ]
  260.  3. SET MODEM <modem-type>
  261.  4. (only if necessary) SET DIAL HANGUP OFF
  262.  5. DIAL <phone-number>
  263.  
  264. The order is important.
  265.  
  266. The SET DIAL KERMIT-SPOOF command works only for Telebit and US Robotics modem
  267. types; it is OFF by default.  You may wish to experiment with large packets
  268. (1K or greater) and various window sizes with spoofing disabled in the modem.
  269. In some situations the transfer rates achieved under these conditions may be
  270. better than with protocol spoofing turned on.  Also, attribute (A) packets are
  271. not passed by current Telebit modems with spoofing enabled so if they are
  272. desired spoofing must be turned off.
  273.  
  274. The SET DIAL MNP-ENABLE command only works for Telebit modems.  It is OFF
  275. by default, to prevent (a) loss of incoming data after successful connection
  276. to a non-MNP modem, and (b) transmission of garbage characters to the remote
  277. host when the answering modem is not MNP capable (which can ruin automatic
  278. speed detection, login processes, script program execution, etc).  See Telebit
  279. section for details.
  280.  
  281. If C-Kermit's dialing methods are insufficient for your purposes, you can
  282. write a C-Kermit script program to do the dialing.  Or you can use (or write)
  283. another program to accomplish the dialing, and then run C-Kermit "underneath"
  284. your dialing program by giving it the open file descriptor:
  285.  
  286.   kermit -l <n> -m unknown
  287.  
  288. where <n> is the numeric file desciptor.  (This feature is available in the
  289. UNIX and OS/2 versions of C-Kermit.)  Or you can modify the ckudia.c module.
  290.  
  291.  
  292. HAYES AND COMPATIBLE MODEMS
  293.  
  294. C-Kermit should work correctly with Hayes and other modems that use the AT
  295. command set.  These include Hayes 1200, Hayes 2400, and Hayes 9600 bps modems,
  296. compatibles, as well as Telebit and HST modems.  See the next section for
  297. Telebit information.  C-Kermit sends AT commands to the modem and then reads
  298. the modem's response.  The code is designed to work whether the modem is
  299. configured to echo its commands (E1) or not (E0), and whether it replies with
  300. numeric (V0) or word (V1) result codes.  C-Kermit does not change the echoing
  301. state or result code mode of the modem.  However, C-Kermit issues the Q0
  302. command to the modem to ensure that it *does* produce result codes.
  303.  
  304. C-Kermit assumes that the modem's Command Line Terminator (S3) is set to 13
  305. (carriage return).  If it is not, C-Kermit's dialog with the modem might not
  306. work correctly.
  307.  
  308.  
  309. TELEBIT MODEM DIALING SUPPORT
  310.  
  311. There are numerous Telebit modem models, with differing capabilities and
  312. features.  C-Kermit tries to support them all in a model-independent way.  
  313. To use a Telebit modem, any model, SET MODEM as follows:
  314.  
  315. TELEBIT
  316.   Dial and attempt to connect using the highest protocol appropriate to
  317.   the interface speed between the computer and the modem, and fall back
  318.   automatically to the highest protocol and speed supported by the answering
  319.   modem.  For example, if your interface speed is 19200 bps and you have a
  320.   PEP-capable Telebit, it will start in PEP mode, fall back to one of the
  321.   2400-bps standards, then one of the 1200 bps standards, etc, depending on
  322.   its configuration (see your Telebit manual).
  323.  
  324. PEP-TELEBIT
  325.   Dial in PEP mode, and connect only if the remote modem answers in PEP mode.
  326.   Does not work with Telebit models that do not support PEP.  See Table III.
  327.  
  328. V32-TELEBIT
  329.   Dial in V.32 mode (9600 bps), fall back from there.  Works only with Telebit
  330.   models that support V.32; see Table III.  NOTE: V.32 calls are supposed to
  331.   work no matter what your interface speed is, but it has been observed that
  332.   when calling certain non-Telebit V.32 modems, the connection is not made
  333.   successfully unless C-Kermit's interface speed to the Telebit is 9600.
  334.  
  335. V42-TELEBIT
  336.   Enable V.42 error correction, allowing fallback to MNP, and from there to
  337.   direct (no error correction).  NOTE: Fallback to MNP from V.42 is allowed
  338.   even if DIAL MNP-ENABLE is OFF.  Works only with Telebit models supporting
  339.   V.42 error control.  See Table III.
  340.  
  341. SLOW-TELEBIT
  342.   Dial at 2400 bps (V.22bis), fall back from there.
  343.  
  344. Telebit modems come in many models that are incompatible with each other, not
  345. only as to features, but also which commands control which features.  The
  346. features, commands, and acceptable S-register values (and their meanings) can
  347. vary not only among models, but even among different ROM versions on the same
  348. model.  Rather than have dozens of separate SET MODEM TELEBIT-xxx commands,
  349. C-Kermit queries the modem for its model number with an ATI command, and then
  350. adjusts its modem commands accordingly.  Responses to the ATI command are
  351. shown in Table I.
  352.  
  353.  
  354. ---------------------------------------------------------------------------
  355. Table I: Telebit Modem ATI Command Responses
  356. ---------------------------------------------------------------------------
  357.   ATI  Model Numbers           Examples
  358.   ---  -------------           --------
  359.   123                          Telebit in "total Hayes-1200" emulation mode
  360.   960                          Telebit in Conventional Command (Hayes) mode
  361.   961  RA12C                   IBM PC internal original Trailblazer
  362.   962  RA12E                   External original Trailblazer, DCA Fastlink,
  363.                                  or Racal-Milgo RM1822
  364.   963  RM12C                   Rackmount original Trailblazer
  365.   964  T18PC                   IBM PC internal Trailblazer-Plus (TB+)
  366.   965  T18SA, T2SAA, T2SAS     External TB+, T1600, T2000, T3000, WB, and later
  367.                                  or Ven-Tel Pathfinder EC18K (see below)
  368.   966  T18RMM                  Rackmount TB+
  369.   967  T2MC                    IBM PS/2 internal TB+
  370.   968  T1000                   External T1000
  371.   969  ?                       QBlazer
  372.   971  T25SA                   External T2500 or T1500 (see below)
  373.   972  T25RM                   Rackmount T2500
  374. ---------------------------------------------------------------------------
  375.  
  376. Certain incompatible models show the same response to ATI.  The ATI3
  377. command is used to differentiate among them, as shown in Table II.
  378.  
  379. ---------------------------------------------------------------------------
  380. Table II: Telebit Modem ATI3 Command Responses
  381. ---------------------------------------------------------------------------
  382. ATI        If ATI3 Response 
  383. Response   Contains            Telebit Model Is
  384. --------   -----------------   ----------------
  385.  965       "T1600"             T1600
  386.  965       "T3000"             T3000
  387.  965       "World"             WorldBlazer
  388.  965       "Version B"         TrailBlazer-Plus or T2000 external version 1
  389.  965       "TBSA"              TrailBlazer-Plus or T2000 external version 2
  390.  965       "TBRM"              TrailBlazer-Plus or T2000 rackmount version 2
  391.  965       "DC"                Ven-Tel Pathfinder EC18K (= TB+ version 1)
  392.  971       "T1500"             T1500
  393.  971       (anything else)     T2500
  394. ----------------------------------------------------------------------------
  395.  
  396.  
  397. The features of the various models and the commands used by Kermit to control
  398. them are shown in Table III.  The commands in the PEP column are used to force
  399. PEP and allow compression (SET MODEM PEP-TELEBIT).  The commands in the V.32
  400. column are used with SET MODEM V32-TELEBIT.  The commands in the V.42 column
  401. are used with SET MODEM V42-TELEBIT.  The commands in the MNP column are used
  402. if SET DIAL MNP-ENABLE is ON and the modem type is TELEBIT, PEP-TELEBIT, or
  403. V32-TELEBIT, SLOW-TELEBIT, but not V42-TELEBIT; if SET MNP-ENABLE is OFF, the
  404. S-registers in the MNP column are set to 0.  The Pass BREAK column shows the
  405. commands used to ensure that the modem passes the BREAK signal through (rather
  406. than treating it as an "escape-to-command-mode" signal).
  407.  
  408. -------------------------------------------------------------------------------
  409. Table III.  Telebit Modem Features and Commands
  410. ------+---------------------+-------+--------+--------+-------------+----------
  411.       |                     |       |        |        |             | Kermit
  412. Model |      PEP            | V.32  |  V.42  | MNP    | Pass BREAK  | Spoof
  413. ------+---------------------+-------+--------+--------+-------------+----------
  414. TB    | S50=255 S110=1      |  No   |  No    | S95=2  |    S54=3    | PEP only
  415. TB+   | S50=255 S110=1      |  No   |  **    | S95=2  |    S54=3    | PEP only
  416. T2000 | S50=255 S110=1      |  No   |  **    | S95=2  |    S54=3    | PEP only
  417. T1000 | S50=255 S110=1      |  No   |  No    | S95=2  |    S54=3    | PEP only
  418. T2500 | S50=255 S110=1      | S50=6 |  No    | S95=2  |    S54=3    | PEP only
  419. T1500 |      No             | S50=6 |  **    | S95=2  |    S54=3    | PEP,V.32
  420. ------+---------------------+-------+--------+--------+-------------+----------
  421. T1600 |      No             | S50=6 | S180=2 | S180=3 | S61=0 S63=0 | PEP,V.32
  422. T3000 |      No             | S50=6 | S180=2 | S180=3 | S61=0 S63=0 | PEP,V.32
  423. QB    |      No             | S50=6 | S180=2 | S180=3 | S61=0 S63=0 | No
  424. WB    | S50=255S190=1S191=7 | S50=6 | S180=2 | S180=3 | S61=0 S63=0 | PEP,V.32
  425. ------+---------------------+-------+--------+--------+-------------+----------
  426. **  For V.42 error control: "S50=0 S95=2 S97=1 S98=3 S106=1".
  427.  
  428. All models but the QBlazer support Kermit spoof (but see below).
  429.  
  430. Group I (old command set):
  431.  
  432.           TB = Original TrailBlazer (PEP, MNP, V.22bis, V.22, Bell 212A & 103)
  433.          TB+ = TrailBlazer-Plus = TrailBlazer + V.42 (but only in new ROMs)
  434.        T1000 = TrailBlazer-Plus, speed <= 9600, no PEP compression
  435.        T2000 = TrailBlazer-Plus + SDLC (not used by Kermit, so same as TB+)
  436.        T2500 = TrailBlazer-Plus + V.32 (9600 bps)
  437.        T1500 = T2500 minus PEP
  438.  
  439. Group II (new command set):
  440.  
  441.        T1600 = V.32, MNP, V.22bis, V.22, V.23, Bell 212A & 103
  442. QB = QBlazer = T1600 without Kermit spoof and minus some other options
  443.        T3000 = T1600 + V.32bis (14400 bps)
  444.  WorldBlazer = T3000 + PEP + LZ and V.42bis compression + 76800 & 115200 bps.
  445.  
  446. C-Kermit does not attempt to control whether the modem changes its interface
  447. speed to match the connection speed -- that is up to you; you can configure
  448. the modem any way you prefer (using S51 or, to some extent on new-style modems
  449. S180 and S181), but make sure that the modem's configuration agrees with
  450. C-Kermit's DIAL SPEED-MATCHING setting.  When DIAL SPEED-MATCHING is ON (which
  451. is the default), C-Kermit will change its interface speed automatically
  452. according to the speed reported in the modem's CONNECT message; when it is
  453. OFF, C-Kermit does not change the speed.
  454.  
  455. The DIAL KERMIT-SPOOF command is only effective for the Telebit models that
  456. supply a Kermit spoof, that is, all but the QBlazer.  If the Telebit model is
  457. TrailBlazer, TrailBlazer-Plus, T1000, T2000, or T2500, PEP mode is forced even
  458. if your SET MODEM command specified a Telebit modem type other than
  459. PEP-TELEBIT, because the Kermit spoof only works in PEP mode on those models.
  460. On the other models supporting the Kermit spoof, it works on both PEP
  461. connections and V.32 MNP (but not V.42) connections.  Thus, you might also
  462. have to SET MODEM MNP-ENABLE ON in order to get the Kermit Spoof to work on
  463. these newer models when making a V.32 connection.
  464.  
  465. SHOW DIAL does not show the complete initialization string for Telebit modems.
  466. Telebit modems are initialized in several steps, and the initialization
  467. command depends upon your current communication parameters, which model of
  468. Telebit modem you have (which C-Kermit learns during the modem initialization
  469. process), and other factors.  If you use the SET DIAL INIT-STRING command to
  470. change the initialization string, this disables the multistep process and uses
  471. only the string that you have specified.
  472.  
  473. If you want to use the built-in multi-step process, but you also want to
  474. override one or more of the settings that are done in this process, or add
  475. additional settings, you can use SET DIAL DIAL-COMMAND to add commands to the
  476. dial string (which is normally ATD%s\13), for example "SET DIAL DIAL-COMMAND
  477. AT&C1&D2S181=1DT%s\13".
  478.  
  479. FLOW-CONTROL versus dialing: If you have SET FLOW to any of the hardware
  480. options supported by your version of C-Kermit, such as RTS/CTS, and if
  481. C-Kermit knows how to set the flow control on your modem, it will do this as
  482. part of the DIAL command.  Several cautions are needed here:
  483.  
  484.  . If C-Kermit's FLOW-CONTROL setting is Xon/Xoff or other type of software
  485.    flow control, C-Kermit will not attempt to change your modem's flow control
  486.    setting, since software flow control is most commonly used end-to-end.  One
  487.    way to engage Xon/Xoff flow control directly between C-Kermit and the
  488.    local modem is to change your modem's DIAL INIT-STRING to do it.
  489.  
  490.  . If your version of C-Kermit does not support SET FLOW RTS/CTS (or other
  491.    hardware options), then C-Kermit will not attempt to change your modem's
  492.    flow control setting.  Change your modem's DIAL INIT-STRING to do it.
  493.  
  494. Hardware flow control options are presently handled only for Telebit modems.
  495. On other modem types, you can set the flow control outside of Kermit, or
  496. change Kermit's DIAL INIT-STRING.
  497.  
  498. Most modern modems support RTS/CTS (if they support any hardware flow control
  499. at all), but some computers use different RS-232 circuits for the same
  500. purposes, e.g. DTR and CD, or DTR and CTS.  In such cases, you might be able
  501. to make your computer work with your modem by appropriately cross-wiring the
  502. circuits in the cable connector, for example the computer's DTR to the modem's
  503. RTS, and modem's CD to the computer's CTS.  HOWEVER, C-Kermit does not know
  504. you have done this.  So if you have (say) SET FLOW DTR/CD, C-Kermit will make
  505. no attempt to tell the modem to use RTS/CTS.  You probably did this yourself
  506. when you configured the modem; if not, you can put the appropriate command in
  507. the DIAL INIT-STRING or DIAL-COMMAND.
  508.  
  509. C-Kermit is fully compatible with "TIES" (Time Independent Escape Sequence)
  510. modems.  A TIES modem does not require any guard time around its escape
  511. sequence.  The following text:
  512.  
  513. +++ATH0
  514.  
  515. if sent through a TIES modem, for example because you were uploading this
  516. file through it, could pop the modem back into command mode and make it hang
  517. up the connection.  Newer versions of the Telebit T1600 and T3000 (version
  518. LA3.01E firmware and later), and all WorldBlazers, use TIES.
  519.  
  520. However, unlike other protocols (such as XMODEM, YMODEM, ZMODEM, SLIP, PPP),
  521. Kermit handles this situation very nicely.  Any sequence of 3 or more repeated
  522. characters is encoded in a special way, so no matter what your escape sequence
  523. is, Kermit transfers won't contain it (note: these comments apply to transfers
  524. between any pair of Kermit programs that negotiate repeat-count compression;
  525. such programs include C-Kermit, MS-DOS Kermit, IBM Mainframe Kermit, and
  526. PDP-11 Kermit).  For example, if your escape sequence is +++, and +++ appears
  527. in your data, it is encoded for transmission as ~#+.
  528.  
  529. TIES will still bite you, however, if you are using Kermit's TRANSMIT command
  530. to upload files through a TIES modem, or, indeed, any time your terminal or
  531. computer sends the escape sequence into the originating modem.  If you are
  532. using a Telebit TIES modem, you can turn off the modem's escape sequence
  533. recognition with:
  534.  
  535.   AT S48=0 S2=255
  536.  
  537. But when escape sequence recognition is turned off, "modem hangup"
  538. (<pause>+++<pause>ATH0<CR>) will not work, so you should also be sure to SET
  539. DIAL MODEM-HANGUP OFF.
  540.  
  541.  
  542. TERMINAL EMULATION
  543.  
  544. Except for the OS/2 and Macintosh versions, C-Kermit does not emulate any kind
  545. of terminal.  Rather, it acts more or less as a "transparent pipe", passing
  546. the characters you type during a CONNECT session to the remote host, and
  547. sending the characters received from the remote host to your screen.  Whatever
  548. is controlling your keyboard and screen provides the specific terminal
  549. emulation: a real terminal, a PC running a terminal emulator, etc, or (in the
  550. case of a self-contained workstation) your console driver, a terminal window,
  551. xterm, etc.
  552.  
  553. There are several exceptions to the "transparent pipe" rule:
  554.  
  555.  - During a TELNET ("set host") session, C-Kermit itself executes the
  556.    TELNET protocol and performs TELNET negotiations.  (But it does not
  557.    perform TN3270 protocol or any other type of 3270 terminal emulation.)
  558.  
  559.  - If you have changed your keyboard mapping using SET KEY, C-Kermit
  560.    replaces the characters you type with the characters or strings you
  561.    have mapped them to.
  562.  
  563.  - If you SET your TERMINAL CHARACTER-SET to anything besides TRANSPARENT,
  564.    C-Kermit translates your keystrokes (after applying any SET KEY
  565.    definitions) before sending them to the remote host, and translates the
  566.    characters received from the remote host before sending them to your
  567.    screen.
  568.  
  569.  - If your remote and/or local TERMINAL CHARACTER-SET is an ISO 646 7-bit
  570.    national character set, such as German, French, Italian, Swedish, etc, or
  571.    Short KOI used for Cyrillic, C-Kermit's CONNECT command automatically skips
  572.    over ANSI escape sequences to avoid translating their characters.  Only
  573.    ANSI/ISO standard (VT100/200/300-like) 7-bit escape sequence formats are
  574.    supported for this purpose, no proprietary schemes like H-P, Televideo,
  575.    Tektronix, etc.
  576.  
  577. The SET KEY command (except in OS/2) does not allow a key definition to be
  578. (or contain) the NUL (\0) character.
  579.  
  580. If you are running C-Kermit under a console driver, or in a terminal window,
  581. that emulates the VT100, and use C-Kermit to log in to a VMS system, the
  582. console driver or terminal window (not Kermit) is supposed to reply to the
  583. "what are you?" query (ESC Z) from the VAX.  If it doesn't, and you can't make
  584. it do so, then you can (a) live with the "unknown terminal" problem; (b) tell
  585. VMS to SET TERMINAL/DEVICE=VT100; (c) program a key using SET KEY to send the
  586. appropriate sequence and then punch the key at the right time; or (d) use the
  587. VMSLOGIN macro that is defined in CKERMIT.INI to do this for you
  588. automatically.
  589.  
  590. SET SESSION-LOG { TEXT, BINARY }, which is effective in UNIX and AOS/VS but
  591. not other C-Kermit versions, removes CR, DEL, NUL, XON, and XOFF characters
  592. ("Using C-Kermit" neglects to mention that XON and XOFF are removed).  The
  593. TEXT-mode setting is ineffective during SCRIPT command execution, as well as
  594. on X.25 connections.
  595.  
  596.  
  597. THE TRANSMIT COMMAND
  598.  
  599. Session logging is inactive during the TRANSMIT command, even if you have
  600. given a LOG SESSION command.
  601.  
  602.  
  603. FILE TRANSFER
  604.  
  605. When referring to MS-DOS, Atari ST, OS/2, or other file specifications that
  606. contain backslash characters in a C-Kermit command, you must double each
  607. backslash, for example:
  608.  
  609.   C-Kermit>get c:\\directory\\foo.txt
  610.  
  611. This is because backslash is used in C-Kermit commands for introducing special
  612. character codes, variables, functions, etc.  If you are sending this GET
  613. command to another copy of C-Kermit running as a server, for example on OS/2
  614. or the Atari ST, it too treats backslashes as prefix characters, so you will
  615. need 4 (yes, 4) copies of each backslash:
  616.  
  617.   C-Kermit>get c:\\\\directory\\\\foo.txt
  618.  
  619. Attempting to cancel local-mode file reception at a very early stage (i.e.
  620. before data packets are exchanged) with X or Z does not work.  Workarounds:
  621. Use E or Ctrl-C instead, or wait until the first data packets are sent.
  622.  
  623. If C-Kermit is sending a file, remote-mode packet-mode breakout (Ctrl-C Ctrl-C
  624. by default) is not effective until after C-Kermit sends its first packet.  If
  625. C-Kermit is receiving a file or is in server mode, it will be effective right
  626. away.  In the former case, the SET DELAY value determines the earliest time at
  627. which you can break out of packet mode.
  628.  
  629. BUG: C-Kermit (at least the UNIX version), when told to send a file to which
  630. the user has directory-listing access but does not have read access, goes into
  631. protocol mode, telling the user to escape back and give a RECEIVE command,
  632. etc, and only then does it notice that the file can't be opened, and gives a
  633. "?Read access denied" message -- but this is a terminal message, not an
  634. Error packet, so the user (having escaped back already) never sees it.  The
  635. message should be issued immediately, and protocol mode should not be entered
  636. (that is what zchki() is supposed to ensure!).  If a fatal error message is
  637. to be issued during protocol mode, it should come in an E-packet.
  638.  
  639. Some communication programs have errors in their implementation of Kermit
  640. attribute packets.  If you get an error message from your communication
  641. program like "Attribute error", tell C-Kermit to SET ATTRIBUTES OFF.  Better
  642. yet, switch to a real Kermit program, such as MS-DOS Kermit.
  643.  
  644. Occasionally, when in receiving files in remote mode using a large window
  645. size, attempts to cancel a file (X) can take a long time.
  646.  
  647. The fullscreen file transfer display will not work right if your terminal type
  648. is set incorrectly, or is not known to the host operating system.  Even when
  649. it does work, it might slow down your file transfers a bit, especially on
  650. high-speed network connections.  On certain small computers, it has been
  651. reported to cause increased disk activity due to swapping or paging.  The
  652. fullscreen display is not particularly useful with speaking or Braille devices.
  653.  
  654. If you have trouble transferring files over a TCP/IP connection, give the
  655. command:
  656.  
  657.   SET PARITY SPACE
  658.  
  659. and try again.  If that doesn't work, also try a shorter packet length.
  660.  
  661. On the other hand, if file transfers through a TCP/IP connection work, but
  662. are very slow, use a longer packet length, 2000 or more.  Make sure FLOW is
  663. NONE.
  664.  
  665. Some communication software, notably a certain popular commercial package,
  666. claim to implement sliding windows, but do not do so correctly.  If sliding
  667. window transfers fail, set C-Kermit's window size to the smallest one that
  668. works, for example:
  669.  
  670.   SET WINDOW 1
  671.  
  672. The UNIX version of C-Kermit discards carriage returns when receiving files
  673. in text mode.  Thus, "bare" carriage returns (sometimes used to achieve
  674. overstriking) are lost.
  675.  
  676. SET FILE COLLISION BACKUP is the default.  This means:
  677.  
  678.  - If you send the same file lots of times, there will be many backup files.
  679.    There is no automatic mechanism within Kermit to delete them, no notion of
  680.    a "version retention count", etc. 
  681.  
  682.  - If a file arrives that has the same name as a directory, the file transfer
  683.    fails.  Send the file with another name, or use SET FILE COLLISION RENAME.
  684.  
  685. SET FILE COLLISION UPDATE depends on the date/time stamp in the attribute
  686. packet.  However, this is recorded in local time, not GMT, and there is no
  687. indication of time zone.  The time is expressed to the precision of 1 second,
  688. but some file systems do not record with this precision -- for example, MS-DOS
  689. records the file date only to the nearest 2 seconds.  This can cause update
  690. operations to send more files than necessary.
  691.  
  692. SET FILE COLLISION OVERWRITE is risky, use it with caution.  The existing
  693. file can be deleted even if the incoming file is refused.
  694.  
  695. When C-Kermit is receiving files from another Kermit program that has been
  696. given the MAIL or REMOTE PRINT command, C-Kermit follows the current filename
  697. collision action.  This can be disconcerting if the action was (for example)
  698. BACKUP, because the existing file will be renamed, and the new file will be
  699. mailed (or printed) and then deleted.  Kermit cannot temporarily change to
  700. RENAME because the file collision action occurs when the filename packet is
  701. received, and the PRINT or MAIL disposition only comes later, in the Attribute
  702. packet.
  703.  
  704. The STATISTICS command will produce an incorrect report if (a) it does not
  705. know the true communication speed (e.g. on a network connection), or (b) it
  706. knows the true serial interface speed to a modem, but the modem is using a
  707. different communication speed with the other modem.  Similarly, in these
  708. circumstances, C-Kermit's automatic calculation of the packet timeout interval
  709. might also be incorrect, which can cause file transfers to fail.  One solution
  710. to the latter problem is to SET SEND and RECEIVE TIMEOUT to appropriate values
  711. for your true communication speed and packet length.
  712.  
  713. TELNET option negotiations are not handled during file transfer.
  714.  
  715. Why is Kermit file transfer over a TCP/IP connection slower than FTP?  Because
  716. the Kermit program on the remote end of the connection is not running directly
  717. on a TCP socket, but rather running underneath a TELNET server, usually on a
  718. pseudoterminal and under a login shell, with the vast amounts of per-character
  719. overhead all of that implies.  Future Kermit releases will be able to act
  720. directly as TCP servers, eliminating all this overhead.
  721.  
  722.  
  723. SCRIPT PROGRAMMING
  724.  
  725. You can't use END or RETURN statements in FOR, WHILE, and XIF commands (you
  726. can use them, but they won't do what you expect).
  727.  
  728. INPUT and REINPUT caseless string comparisons do not work for non-ASCII
  729. (international) characters.  Workaround: SET INPUT CASE OBSERVE.  Even then,
  730. the "lexically less than" and "lexically greater than" operations (IF LLT,
  731. IF LGT) probably won't work as expected.  C-Kermit does not know the collating
  732. sequence for different character sets and languages.
  733.  
  734. You can't include a NUL character (\0) in C-Kermit command text without
  735. terminating the character string in which it appears.  For example:
  736.  
  737.   echo In these brackets [\0] is a NUL
  738.  
  739. will echo "In these brackets [".  This applies to ECHO, INPUT, OUTPUT, and all
  740. other commands.  This is because C-language strings are terminated internally
  741. by the NUL character, and it allows all of C-Kermit's string comparison and
  742. manipulation functions to work in the normal way.
  743.  
  744. To illustrate:
  745.   INPUT 5 \0
  746. is equivalent to:
  747.   INPUT 5
  748. and:
  749.   INPUT 5 ABC\0DEF
  750. is equivalent to:
  751.   INPUT 5 ABC
  752.  
  753. INPUT operations discard and ignore NUL characters that arrive from the
  754. communication device, meaning that they do not figure into matching operations
  755. (e.g. A<NUL>B matches AB); they are not deposited in the INPUT buffer
  756. (\v(input)); and they are not counted in \v(incount), with two exceptions:
  757.  
  758.   1. An arriving NUL character restarts the INPUT SILENCE timer.
  759.  
  760.   2. An arriving NUL character terminates the INPUT command with the
  761.      SUCCESS condition if the INPUT command was given an empty search
  762.      string.  In this case \v(incount) is set to 1.
  763.  
  764. Also, the \v(inchar) variable is null (completely empty) if the last INPUT
  765. character was NUL.  That is, there is no way to tell only by looking at
  766. \v(inchar) the difference between a NUL that was INPUT and no INPUT at all.
  767. If the INPUT command succeeded but \v(inchar) is empty, then a NUL character
  768. was input.  Also, \v(incount) will be set to 1.
  769.  
  770. \v(incount) and \v(inchar) are NOT affected by the CLEAR command.
  771.  
  772. GOTO can be used sort of like switch/case.  For example, if you know that the
  773. value of \%a is 1, 2, or 3, you can "goto \%a" provided you have labels :1,
  774. :2, and :3.  What it missing, however, is an automatic way to trap failing
  775. GOTOs, similar to the "default:" clause of a C switch() statement.
  776.  
  777. The following script program:
  778.  
  779.   asg \%n \ffiles(\%1)
  780.   set count \%n
  781.   :loop
  782.   asg \%f \fnextfile()
  783.   send \%f
  784.   rem host print \%f
  785.   if count goto loop
  786.  
  787. does not work as expected.  The SEND command (and any other command that
  788. parses a filename) implicitly calls the same internal function that \ffiles()
  789. calls, and thus destroys the file list set up in the first line.  To
  790. accomplish this type of operation: (1) give the wild filespec to \ffiles();
  791. (2) loop through the file list and assign each filename to an array element;
  792. (3) use the array of filenames in subsequent file-related commands.  Example:
  793.  
  794.   asg \%n \ffiles(\%1)
  795.   declare \&f[\%n]
  796.   for \%i 1 \%n 1 { asg \&f[\%i] \fnextfile() }
  797.   for \%i 1 \%n 1 { -
  798.     send \&f[\%i], -
  799.     rem host print \&f[\%i] -
  800.   }
  801.  
  802. Certain settings are local to each command level, meaning that subordinate
  803. command levels (macros or command files) can change them without affecting
  804. their values at higher command levels.  When a new command level is invoked,
  805. the value is inherited from the previous level.  These settings are:
  806.  
  807.   CASE
  808.   COUNT and \v(count)
  809.   INPUT CASE
  810.   INPUT TIMEOUT
  811.   MACRO ERROR
  812.   TAKE ERROR
  813.  
  814. This arrangement allows CASE, TIMEOUT, and ERROR settings, which are used to
  815. control automatic exit from a command file or macro upon error, to be
  816. automatically restored when the command file or macro exits.
  817.  
  818. The COUNT variable follows this rule too, which permits nested SET COUNT /
  819. IF COUNT loops, as in this example in which the inner loop counts down from
  820. the current COUNT value of the outer loop (try it):
  821.  
  822.   DEFINE INNER WHILE COUNT { WRITE SCREEN {   Inner:}, SHOW COUNT }
  823.   SET COUNT 5
  824.   WHILE COUNT { WRITE SCREEN Outer:, SHOW COUNT, DO INNER }
  825.  
  826. Keep in mind that an inferior command level cannot manipulate the COUNT
  827. value held by a higher level.  For example:
  828.  
  829.   DEFINE OOFA SHOW COUNT, IF COUNT GOTO LOOP
  830.   SET COUNT 5
  831.   :LOOP
  832.   OOFA
  833.   ECHO Done
  834.  
  835. results in an infinite loop; the COUNT value remains at 5 because it is never
  836. decremented at the same level at which it was set.
  837.  
  838. NOTE: "WHILE COUNT" did not work prior to edit 095 of ckuusr.c, 19 Jan 93.
  839.  
  840. (End of CKCKER.BWR)
  841.